package no.gnet.edvd.types;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.joda.time.DateTime;

@JsonIgnoreProperties(ignoreUnknown = true)
public class Transfer extends Persist {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -3963041960151603363L;
	Player from;
	Player to;
	double amount;
	DateTime creationDate;
	int betid;
	boolean completed=false;
	
	public Transfer(){
		
	}
	public Transfer(Player from, Player to, double amount) {
		super();
		this.from = from;
		this.to = to;
		this.amount = amount;
	}
	
	public Transfer(int id, Player from, Player to, double amount) {
		this(from,to,amount);
		this.id=id;
	}
	public Player getFrom() {
		return from;
	}
	public void setFrom(Player from) {
		this.from = from;
	}

	public Player getTo() {
		return to;
	}
	public void setTo(Player to) {
		this.to = to;
	}
	public double getAmount() {
		return amount;
	}
	public void setAmount(double amount) {
		this.amount = amount;
	}

	@Override
	public String toString() {
		return "Transfer [from=" + from + ", to=" + to + ", amount=" + amount
				+ "]";
	}



	public boolean isCompleted() {
		return completed;
	}

	public void setCompleted(boolean completed) {
		this.completed = completed;
	}

	public int getBetid() {
		return betid;
	}

	public void setBetid(int betid) {
		this.betid = betid;
	}
}
